package com.linkstec;

import java.nio.charset.Charset;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class CpuTest {

	private static final Logger logger = LogManager.getLogger();
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		logger.info(Charset.defaultCharset());
		System.out.println("cpu数：" + Runtime.getRuntime().availableProcessors());
		System.out.println("占用totalMemory数：" + Runtime.getRuntime().totalMemory()/1024/1024 + "MB");
		System.out.println("占着没用freeMemory数：" + Runtime.getRuntime().freeMemory()/1024/1024 + "MB");
		System.out.println("总可用maxMemory数：" + Runtime.getRuntime().maxMemory()/1024/1024 + "MB");
		System.out.println("现在线程的名字：" + Thread.currentThread().getName());

		logger.info("cpu数：" + Runtime.getRuntime().availableProcessors());
		logger.info("fuck");
		System.out.println("user.dir是:" + System.getProperty("user.dir"));
	}

}
